package com.hongli.blog.service.impl;

import com.hongli.blog.entity.BugDao;
import com.hongli.blog.service.Bugservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * @Author ZERO
 * @Date 2021/11/17 17:36
 **/
@Service
public class Bugserviceimpl implements Bugservice {

    @Autowired
    private Bugservice bugservice;

    public List<BugDao> SelectAllBug(){
        return bugservice.SelectAllBug();
    }

    public BugDao SelectBug(int bugid){
        return bugservice.SelectBug(bugid);
    }

    @Transactional(rollbackFor = Exception.class)
    public void InsertBug(String buggrade, String bugcontent, Date bugcreatetime){
        bugservice.InsertBug(buggrade,bugcontent,bugcreatetime);
    }

    @Transactional(rollbackFor = Exception.class)
    public void UpdateBugContent(BugDao bugDao){
        bugservice.UpdateBugContent(bugDao);
    }

    @Transactional(rollbackFor = Exception.class)
    public void DeleteBUG(int bugid){
        bugservice.DeleteBUG(bugid);
    }
}
